<template>
    <view class="content">

        <!-- <statistical
            ref="statisticalTow"
            @getDetailsInfo="getDetailsInfo"
            @setbufAcitve="setbufAcitve"
        ></statistical> -->
        <!-- <statisticalThree ref="statisticalThree"></statisticalThree> -->

        <statistical ref="statisticalTow"></statistical>

    </view>
</template>

<script>
// import statisticalTow from "@/components/report/statistical/statisticalTow.vue";
// import statisticalThree from "@/components/report/statistical/statisticalThree.vue";

import statistical from "@/components/report/statisticalV3/index.vue";
import staticConst from "@/js/const/StaticConst.js";

export default {
    components: {
        // statisticalTow, statisticalThree
        statistical
    },
    data() {
        return {
            curPage: staticConst.REP_TJ,
            curIndex: 1, //1,
            actType: 0, // 0:新增产品 1：编辑产品
            isNotData: false, // 没有数据
            isClickUpDownBtn: false,
            tab: -1,
        };
    },
    onLoad(opt) {
        if (opt.tab)
            this.tab = opt.tab;
        else
            this.tab = -1;
    },

    onShow() {
        this.addEvent();
    },

    onHide() {
        this.removeEvent();
    },

    onUnload() {
        this.removeEvent();
    },

    onReady() {
        this.$refs.statisticalTow.initComponent()
        this.$refs.statisticalTow.initData(this.tab);
    },

    methods: {
        // 默认选中第一个
        setbufAcitve(data) {
            console.log('默认数据', data);
            this.$refs.statisticalThree.initData(data);
        },
        getDetailsInfo(data) {
            this.$refs.statisticalThree.initData(data);
        },
        /****显示上传产品列表窗口****/
        showUploadGdsWin() {
            // this.$refs.uploadGoodsFile.show("show");
        },

        /*****显示上传下载菜单****/
        upDownClick() {
            this.isClickUpDownBtn = true;
            this.$refs.upAndDownLoadMenu.show();
        },

        removeEvent() { },

        addEvent() { },
    },
};
</script>
<style lang="scss">
.content {
    display: flex;
    justify-content: flex-start;
    min-width: 820px;
    height: 100%;
    position: relative;
}
</style>